<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
class preoperatorio extends CI_Controller {
    
    function __construct() {
        parent::__construct();
    }
 
    
    function guardar(){
        $login=$this->loggedIn();         
        if ($this->input){            
           
            $idPaciente= $this->input->post('idPaciente');
            $idDoctor= $this->input->post('idDoctor');          
            $estado= $this->input->post('Estado');
            //arreglos            
            $Examenes= $this->input->post('Examenes');
            $detalles= $this->input->post('detalles');                      
            $this->load->model('Preoperatorio_model');
            $this->Preoperatorio_model->insertarOrden($idPaciente,$idDoctor,$estado,$Examenes,$detalles);
            
            $login=$this->loggedIn();
            $args['title'] = 'Cirugías';
            $args['content'] = 'cirugia/GuardadoExitoso';
            $args['username'] = $login['username'];
            $this->load->view('view',$args);
        }
        
    }
    
}
?>
